Skip to content

[IOTDB-91] Improve tsfile-spark-connector to support spark 2.4.3#227

Merged
qiaojialin merged 2 commits into
apache:masterfrom
samperson1997:spark-connector
Jul 11, 2019
Merged

[IOTDB-91] Improve tsfile-spark-connector to support spark 2.4.3#227
qiaojialin merged 2 commits into
apache:masterfrom
samperson1997:spark-connector

Conversation

@samperson1997

Copy link
Copy Markdown
Contributor

Improve tsfile-spark-connector to support spark 2.4.3 as is mentioned in issue IOTDB-91.

Spark has decoupled internal Row from external Row, which influences TsFileWriterFactory (extends OutputWriterFactory) and TsFileOutputWriter (extends OutputWriter). Therefore, function toTsRecord has to change param type from Row to InternalRow.

@LeiRui

LeiRui commented Jul 10, 2019

Copy link
Copy Markdown
Contributor

The commands I used in the spark-shell:

import org.apache.iotdb.tsfile._
val df = spark.read.tsfile("testDirect.tsfile") 
df.show
df.write.tsfile("output")

@samperson1997

Copy link
Copy Markdown
Contributor Author

The commands I used in the spark-shell:

import org.apache.iotdb.tsfile._
val df = spark.read.tsfile("testDirect.tsfile") 
df.show
df.write.tsfile("output")

Hi,

I have tried the same file created by TsFileWrite.java, and the commands of reading and writing all passed. I thought the failure may be caused by inconsistent spark version: the spark version should be updated to 2.3 / 2.4, and the tsfile-spark-connector-0.8.0-SNAPSHOT.jar needs to be built again with the accordingly spark version in pom.xml.

@LeiRui

LeiRui commented Jul 10, 2019

Copy link
Copy Markdown
Contributor

The commands I used in the spark-shell:

import org.apache.iotdb.tsfile._
val df = spark.read.tsfile("testDirect.tsfile") 
df.show
df.write.tsfile("output")

Hi,

I have tried the same file created by TsFileWrite.java, and the commands of reading and writing all passed. I thought the failure may be caused by inconsistent spark version: the spark version should be updated to 2.3 / 2.4, and the tsfile-spark-connector-0.8.0-SNAPSHOT.jar needs to be built again with the accordingly spark version in pom.xml.

Tests pass successfully.

@qiaojialin qiaojialin merged commit 0afdab3 into apache:master Jul 11, 2019
@samperson1997 samperson1997 deleted the spark-connector branch July 11, 2019 02:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants